package board.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import board.db.BoardBean;
import board.db.BoardDAO;

public class manager_Hot_Girl_BoardDetailAction implements Hot_Girl_Action {
	 public Hot_Girl_ActionForward execute(HttpServletRequest request,HttpServletResponse response) throws Exception{ 
			request.setCharacterEncoding("utf-8");
	   		System.out.println("마지막 점검");
			BoardDAO boarddao=new BoardDAO();
		   	BoardBean boarddata=new BoardBean();
		   	System.out.println("마지막 점검11");
			int num=Integer.parseInt(request.getParameter("num"));
			boarddao.setReadCountUpdate(num);
		    boarddata=boarddao.getDetail(num);
		   	System.out.println("마지막 점검18");
		   	if(boarddata==null){
		   		System.out.println("안됨3");
		   		return null;
		   	}
		   	System.out.println("됨3");
		   	
		   	request.setAttribute("boarddata", boarddata);
		   	Hot_Girl_ActionForward forward = new Hot_Girl_ActionForward();
		   	forward.setRedirect(false);
		 
		   	forward.setPath("../admin/manager_hot-girl-view.jsp");
		   	return forward;

		 }
	}